/*
 * @Author: zqx me_zqx@163.com
 * @Date: 2025-05-16 17:52:11
 * @LastEditors: zqx me_zqx@163.com
 * @LastEditTime: 2025-07-01 18:00:55
 * @FilePath: /XMate-h5/src/services/minutes/report.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { http } from "@/utils/http";

interface ReportRequestData {
  sentences: Array<{
    content: string;
    startTime: string;
    username: string;
  }>;
}

// 生成会议报告
export function generateReport(confId: string = "", data: ReportRequestData) {
  return http.request({
    url: `/rest/api/conference/${confId}/sales/report/generate`,
    method: "POST",
    data
  });
}

// 获取报表和状态
export function getReport(confId: string = "") {
  return http.request({
    url: `/rest/conference/${confId}/sales/report`,
    method: "GET",
    disableProgress: true
  });
}

// 获取报表和状态 通过shareid
export function getReportByShareId(shareId: string = "") {
  return http.request({
    url: `/rest/api/conference/record/share/${shareId}/report`,
    method: "GET"
  });
}
